<!-- 前台产品详情页,下载页面 -->
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String productCode = request.getParameter("productCode");
productCode=productCode==null?"":productCode;
%>
 
<div class="easyui-layout" style="width:100%;height:100%;" fit="true">
    <div data-options="region:'center',split:true">
		<table id="demoData"></table>
	</div>
</div>  
<script>
var demoTable;
var productCode = '<%=productCode%>';
function initTable(){
	demoTable = $('#demoData').pDataGrid({
		 
	    columns:[[
				  {field:'paperBatchId',checkbox:true},
	              {field:'view',title:'预览',align:'center',formatter:function(value,rows){
						return '<span style="padding:1px;"><a href="'+contentPath+rows.filePath+'"   target="_blank"><img src="'+contentPath+rows.fileIcon+'" width="60px;" height="60px;"  /></a></span>';
				  }},
			      {field:'paperBatchno',title:'批号',align:'center'},
	              {field:'validDate',title:'有效期',align:'center'},
	              {field:'fileName',title:'文件名',align:'center',formatter:function(value,rows){
	            	  return '<span style="padding:1px;"><a href="'+contentPath+rows.filePath+'"   target="_blank">'+rows.fileName+'</a></span>';
		            }},
	              {field:'type',title:'文件性质',align:'center'},
				  {field:'productCode',title:'产品编号',align:'center'},
	              {field:'productName',title:'产品名称',align:'center'},
	              {field:'producingName',title:'生产厂家',align:'center'},
	              {field:'remark',title:'备注',align:'center'},
	              {field:'action',title:'操作',align:'center',formatter:function(value,rows){
						return '<a href="'+contentPath+rows.filePath+'"   target="_blank">下载</a>';
		           }},
	          ]],
	    url:'<c:url value="/product/searchEmBProductPaperBatch.do"/>',  
	    pagination:false,
	    singleSelect:false,
	    queryParams:{
			"productCode":"<%=productCode%>" 
		}
	    
	}); 
}
$(function(){
	if(productCode==""){
		layer.msg("传入参数不合法 ");
		return;
	}else{
		initTable();
	}
	
});


</script>
